package NGUYENHUUDUC_CTLT_EX_TL;

import java.util.Scanner;

public class ex5 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println("Nhap ten: ");
		Scanner sc = new Scanner (System.in);
		String ten = sc.nextLine();
		if(ten.isEmpty()==true){
			System.out.println("Ten khong duoc de trong!");
		return;
		}
		System.out.println(" Nhap vao so tuoi: ");
		String tam = sc.nextLine();
		if(tam.isEmpty()==true){
			System.out.println("Tuoi khong duoc de trong!");
		return;
		}
		byte tuoi = Byte.parseByte(tam);
		System.out.println("Chon tinh trang hon nhan 1/Chua ket hon 2/Da ket hon 3/Ly hon");
		tam = sc.nextLine();
		if(tam.isEmpty()==true){
			System.out.println("Chua chon tinh trang hon nhan!");
		return;
		}
		byte stt = Byte.parseByte(tam);
		System.out.println("Chon gioi tinh 1/Nam 2/Nu");
		tam = sc.nextLine();
		if(tam.isEmpty()==true){
			System.out.println("Xin chon gioi tinh!");
		return;
		}
		byte sex = Byte.parseByte(tam);
		if(tuoi<19 || stt==2 || (tuoi<22 && sex==1)){
			System.out.println("Khong duoc phep tham gia");
		}else{
			System.out.println("Duoc phep tham gia");
		}
	}

}
